package org.com.system.log;

import javax.persistence.Table;

import org.com.system.util.utils.DateUtils;
import org.com.system.util.utils.UUIDUtils;

@Table(name="sys_log_info")
public class Log {

	private String id;
	private String owner;
	private String ownerIp;
	private int operType;
	private String operation;
	private String createTime;
	
	public static Log getLog(){
		return new Log();
	}
	
	private Log(){}
	
	private Log(String owner, String ownerIp, int operType,String operation) {
		setId(UUIDUtils.getUUID());
		this.owner = owner;
		this.ownerIp = ownerIp;
		this.operType = operType;
		this.operation = operation;
		this.setCreateTime(DateUtils.getSystime());
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getOwner() {
		return owner;
	}
	public void setOwner(String owner) {
		this.owner = owner;
	}
	public String getOwnerIp() {
		return ownerIp;
	}
	public void setOwnerIp(String ownerIp) {
		this.ownerIp = ownerIp;
	}
	public int getOperType() {
		return operType;
	}
	public void setOperType(int operType) {
		this.operType = operType;
	}
	public String getOperation() {
		return operation;
	}
	public void setOperation(String operation) {
		this.operation = operation;
	}
	public String getCreateTime() {
		return createTime;
	}
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	
	public void setInfo(String owner, String ownerIp, int operType,String operation){
		this.owner = owner;
		this.ownerIp = ownerIp;
		this.operType = operType;
		this.operation = operation;
	}
	
}
